noinst_LTLIBRARIES = libtp.la

libtp_la_SOURCES = \
  buffer.c  errors.c  get_local_internet_addr.c ll_support.c\
  scps_globali.c  tp_sched.c  tp.c tp_checksum.c \
  tp_handler.c tp_output.c tp_outseq.c \
  tp_process.c tp_socket.c tp_sockopt.c tp_timers.c\
	tp_utility.c tp_utility2.c icmp.c nl_protocol.c \
	udp_handler.c udp_output.c udp_socket.c udp_utility.c \
	wheel_timers.c rs_config.c version.c tp_debug.c \
	scps_np.c q.c ip.c rt_alloc.c \
	create_rules_tap.c tap.c other_proto_handler.c \
	new_compress.c 
  
  
libtp_la_CFLAGS = -fPIC -g -O3 -std=gnu99 -Wall -Werror -march=native
libtp_la_CFLAGS += -DI386 -DLINUX -DIP \
  -DENCAP_DIVERT \
  -DOPT_COMPRESS \
  -DOPT_NEW_COMPRESS \
  -DGATEWAY -DGATEWAY_SELECT \
  -DFAIRER_GATEWAY -DGATEWAY_SINGLE_THREAD \
  -DASSUME_CORRUPT -DTAP_INTERFACE -DGATEWAY_ROUTER \
  -DSYS_MEMORY=10000000 -DSET_INITIAL_CWND=0 \
  -DOPT_SCALE -DOPT_SNACK1 -DOPT_BETS -DOPT_TSTMP \
  -DCONGEST -DVJ_CONGEST -DOPT_SCPS -DINIT_CWND_INCR -DOPT_RECORD_BOUNDARY \
  -DIP_ICMP -DLINUX_STYLE_FIRST_DATA_RTO $(SET_INITIAL_CWND) -DCWND_INFLATE_THROTTLE\
  -DNO_CVS_IDENTIFY -DNL_DEFAULT_IPV4  -DLL_BUFFER=51968 -DTCP_NODELAY

libtp_la_CFLAGS +=  -I. -I${top_srcdir}/libtp -I${top_srcdir}/src/gateway ${EL_CFLAGS}
libtp_la_LDFLAGS = ${EL_LIBS}


version.c :
	@rm -f version.c
	@echo "char *scps_version = \"`git describe`\";" > version.c

CLEANFILES=version.c
